A new panorama generation algorithm for mobile devices was proposed to solve the problem of low stitching speed, more memory consumption, chromatic aberration and ghosting. First, the color correction was performed on source image sequences to balance color and luminance between adjacent images. Then ghosting artifacts were detected when stitching panorama. If a ghosting artifact was found, the corresponding object in the source image would be located, and a gradient domain object removing and region filling operation would be applied to remove the moving object. In addition, Poisson blending was used to further smoothen color transitions and hide visible seams. The time of Poisson blending was greatly reduced after color correction, and a unique memory allocation mechanism was also applied during image stitching process to decrease memory consumption. Finally, the method was tested on a mobile phone with configuration of 332MHz processor and 128MB memory by taking photos of resolution of 1280×720 under different illumination conditions, and compared with the traditional global panorama stitching algorithm by stitching 2 to 9 original sequential images, the memory consumption of global panorama stitching algorithm was from 12.3MB to 23.6MB, while the proposed method took up less memory, only from 9.9MB to 14.5MB. The experimental results show that this method eliminates image seams and "ghost" effect more thoroughly with high mosaic speed and low memory consumption, and the quality of generated panoramic images is better, thus it can be used on mobile devices for panoramic image generation.